import requests

# 设置 API 端点
url = "http://localhost:8012/process_audio"

# 示例 1：请求描述语音情绪（本地文件）
data_local = {
    "text": "描述一下语音的情绪",
    "url": "local:/home/zhaosheng/Documents/dlangchain/app/customer_service_evaluation_system_v2/test.wav"
}

response_local = requests.post(url, json=data_local)
print("Response from local file request:", response_local.json())

# 示例 2：请求翻译内容（远程 URL）
data_remote = {
    "text": "把他说的内容用日语告诉我",
    "url": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/translate_to_chinese.wav"
}

response_remote = requests.post(url, json=data_remote)
print("Response from remote URL request:", response_remote.json())
